import request from '@/utils/request'

//文档对比 上传文件。 //表单上传需定义请求头
export function submitFile(data) {
    return request({
        url: '/basics/upload',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        method: 'post',
        data: data
    })
}
//获取文档对比记录
export function getDiffWordList(data) {
    return request({
        url: '/contras/log/search',
        method: 'get',
        params: data
    })
}
//删除对比记录
export function delCompareLog(ids) {
    return request({
        url: '/contras/log/delete/' + ids,
        method: 'delete'
    })
}

//文档对比获取差异点信息
export function getDiffCounts(data) {
    return request({
        url: '/contras/diff/coordinates',
        method: 'post',
        data: data
    })
}

//查询标注
export function getRemarkList(data) {
    return request({
        url: '/contras/remark/list',
        method: 'get',
        params: data
    })
}
//新增标注
export function addRemark(data) {
    return request({
        url: '/contras/remark/add',
        method: 'post',
        data: data
    })
}
//删除批注
export function delRemark(ids) {
    return request({
        url: '/contras/remark/delete/' + ids,
        method: 'delete'
    })
}
//选中区域相似度分析
export function checkArea(data) {
    return request({
        url: '/contras/diff/area',
        method: 'post',
        data: data
    })
}
//编辑文档
export function editDoc(data) {
    return request({
        url: '/contras/doc/edit',
        method: 'post',
        data: data
    })
}
//保存文档
export function saveEditDoc(data) {
    return request({
        url: '/contras/doc/save',
        method: 'post',
        data: data
    })
}
//对比下载报告
//  logId
export function downloadDiffReport(data) {
    return request({
        url: '/contras/diff/export',
        method: 'post',
        data: data
    })
}
//文档记录list
export function getDocList(data) {
    return request({
        url: '/contras/doc/list',
        method: 'get',
        params: data
    })
}
//删除文档
export function delDoc(ids) {
    return request({
        url: '/contras/doc/delete/' + ids,
        method: 'delete'
    })
}
//标注导出
export function exportRemarkList(data) {
    return request({
        url: 'contras/remark/export',
        method: 'get',
        params: data
    })
}

//导出内容统计
// /contras/doc/export

//文档管理页面选择俩文件进行对比
export function checkDocComparison(data) {
    return request({
        url: '/contras/doc/comparison',
        method: 'post',
        data: data
    })
}
//查询对比分析报告接口
export function getDiffReport(data) {
    return request({
        url: '/contras/diff/list',
        method: 'get',
        params: data
    })
}

//文档管理页面导入 --多文件
export function docManageImportFiles(data) {
    return request({
        url: '/basics/upload/editFiles',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        method: 'post',
        data: data
    })
}
// 出入库管理页面导入---单文件
export function outInImportFiles(data) {
    return request({
        url: '/basics/upload/mainFile',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        method: 'post',
        data: data
    })
}
//获取出入库管理中所有需求库的文档list 文档管理中导入关联文档需要
export function getOutInDocRelList(data) {
    return request({
        url: '/contras/doc/query',
        method: 'get',
    })
}

//发布文档
export function publishDoc(data) {
    return request({
        url: '/contras/doc/address',
        method: 'post',
        data: data
    })
}
/***********自定义配置********/
//获取自定义配置信息
export function getSetInfo() {
    return request({
        url: '/contrast/config/lookup',
        method: 'get'
    })
}
//修改保存自定义配置信息
export function saveSetInfo(data) {
    return request({
        url: '/contrast/config/edit',
        method: 'post',
        data: data
    })
}
